using System;
using UnityEngine;

public class ConstantData
{
	public static Delegate0Args onMaskRiseup;

	public const string PVPPlatformKey = "123feuiuiuiujjjjkdsfjkdsfjkdsjri";

	public const int vedioMissionLimit = 5;

	public const int vedioQuickFireLimit = 3;

	public const int vedioPhysicalPowerLimit = 10;

	public const int missionFailedCountWatchingVedio = 3;

	private static int _vedioMissionCount = -1;
	public static int vedioMissionCount
	{
		get
		{
			if (_vedioMissionCount == -1)
			{
				_vedioMissionCount = PlayerPrefs.GetInt("VedioMission", 0);
			}
			return _vedioMissionCount;
		}
		set
		{
			_vedioMissionCount = value;
			PlayerPrefs.SetInt("VedioMission", _vedioMissionCount);
			PlayerPrefs.Save();
		}
	}

	public static int missionFailedCount;

	public static string prevLevelName;

	private static int _vedioQuickFireCount = -1;
	public static int vedioQuickFireCount
	{
		get
		{
			if (_vedioQuickFireCount == -1)
			{
				_vedioQuickFireCount = PlayerPrefs.GetInt("VedioQuickFire", 0);

			}
			return _vedioQuickFireCount;
		}
		set
		{
			_vedioQuickFireCount = value;
			PlayerPrefs.SetInt("VedioQuickFire", _vedioQuickFireCount);
			PlayerPrefs.Save();
		}
	}

	private static int _vedioPhysicalPowerCount = -1;
	public static int vedioPhysicalPowerCount
	{
		get
		{
			if (_vedioPhysicalPowerCount == -1)
			{
				_vedioPhysicalPowerCount = PlayerPrefs.GetInt("VedioPhysicalPower", 0);
			}
			return _vedioPhysicalPowerCount;
		}
		set
		{
			_vedioPhysicalPowerCount = value;
			PlayerPrefs.SetInt("VedioPhysicalPower", _vedioPhysicalPowerCount);
			PlayerPrefs.Save();
		}
	}

	public const int adShowCountConst = 2;

	public static int adShowCount = 2;

	public const int watchingAdBtnRiseInterval = 1800;

	public static bool watchedAdAtThisBattle = false;

	public const string TutorialObjectName = "Tutorial";

	public static GLanguage GameLanguage = GLanguage.zhCN;

	public static string BattleSceneType = null;

	public const string ToPratice = "ToPratice";

	public const string ToLevel = "ToLevel";

	public const string ToAI = "ToAI";

	public const string RateThisAppProgressKey = "RateProgress";

	public const string RateIntervalKey = "RateInterval";

	public const int RateAppPhysicalGet = 20;

	public const int RateInterval20 = 10;

	public const int RateInterval40 = 40;

	public static int LoadedChapter = 1;

	public const float BallRadiusAdjustment = 0.004f;

	public const float BallDragRayCastRadius = 1f;

	public const float TurnWaitTime = 0.1f;

	public const float TimePerRoundLow = 30f;

	public const float TimePerRoundHigh = 60f;

	public const float TimeLimitQuickFire = 120f;

	public const int QuickFireBallPottedPoint = 100;

	public const float QuickFireComboRewards = 0.5f;

	public const string MissionProgressKeyName = "MissionProgress";

	public const int MissionFireBallPottedPoint = 100;

	public const int MissionShotCount = 5;

	public static int GuidelineLength = 60;

	public const int MissionCueballPottedPunishment = -2;

	public const int MissionFireShots = -1;

	public const int MissionFoulTimeWait = 2;

	public const int MissionPottedPoint = 100;

	public const int MissionSingularityPottedPoint = 300;

	public const int MissionBombPottedPoint = 300;

	public const int MissionAbsorbPottedPoint = 0;

	public const int MissionYellowBallPoint = 150;

	public const int MissionRedBallPoint = 100;

	public const int MissionBlueBallPoint = 200;

	public const int MissionDemonBallPoint = 0;

	public const int MissionJiangYouBallPoint = 0;

	public const int MissionBombBallDuration = 60;

	public const int SpecialPocketProbability = 30;

	public const int PunitiveShots = -2;

	public const int RewardShots = 1;

	public const int PhysicalRecoverInterval = 600;

	public const int physicalStrengthVedioReward = 4;

	private static int _OutlineAndBallLayer = -1;

	private static PoolDataAsset PoolDatas = null;

	private static int _Physical = -1;

	public const int physicalSubstact = 2;

	public static Action onChangePhysical;

	private static float _angularDrag = 1.5f;

	private static int _chips = -1;

	public static Action onChangeChips;

	private static int _extraDrawCount = -1;

	public const int maxPhysical = 20;

	public static LevelDataIndex LevelDatas;

	private static GameStatistics _GameStatisticsData = null;

	private static AchieveRecords _AchieveRecords;

	private static MissionRecords _MissionRecords;

	private static QuickFirePlayer.PlayerData _QuickFireRecords;

	private static float _maxImpulse = GameConfig.MAX_IMPULSE;

	public static int OulineAndBallLayer
	{
		get
		{
			if (_OutlineAndBallLayer == -1)
			{
				_OutlineAndBallLayer = ((1 << LayerMask.NameToLayer("Outline")) | (1 << LayerMask.NameToLayer("Ball")));
			}
			return _OutlineAndBallLayer;
		}
	}

	public static string achieveDataRecordPath => StreamTools.GetPersistentDataPath() + "Records/AchieveDataRecord";

	public static string PoolDataAssetsFile => StreamTools.GetStreamingAssetsPath(usePrefix: true) + "Environment/PoolPhysicalData.asset";

	public static string PooldataAssetsFileEidtorPath => StreamTools.GetStreamingAssetsPath() + "Environment/PoolPhysicalData.asset";

	public static string quickFireGameRecordPath => StreamTools.GetPersistentDataPath() + "Records/QuickFireRecord";

	public static string gameStatisticsDataPath => StreamTools.GetPersistentDataPath() + "Records/GameStatistics";

	public static string missionLevelDataRecordPath => StreamTools.GetPersistentDataPath() + "Records/MissionRecord";

	public static string MissionLevelDataPath => "Levels/";

	public static string MissionLevelDataIndexPath => "Levels/PoolLevelDataIndex.asset";

	public static int physical
	{
		get
		{
			if (_Physical == -1)
			{
				_Physical = PlayerPrefs.GetInt("LastPhysical", 20);
			}
			return _Physical;
		}
		set
		{
			_Physical = value;
			PlayerPrefs.SetInt("LastPhysical", _Physical);
			PlayerPrefs.Save();
			LaunchUIController.SetPhysical(_Physical);
			if (onChangePhysical != null)
			{
				onChangePhysical();
			}
		}
	}

	public static float angularDrag
	{
		get
		{
			return _angularDrag;
		}
		set
		{
			_angularDrag = value;
		}
	}

	public static int chips
	{
		get
		{
			if (_chips == -1)
			{
				_chips = PlayerPrefs.GetInt("LastChip", 200);
			}
			return _chips;
		}
		set
		{
			_chips = value;
			PlayerPrefs.SetInt("LastChip", value);
			PlayerPrefs.Save();
			if (onChangeChips != null)
			{
				onChangeChips();
			}
		}
	}

	public static int extraDrawCount
	{
		get
		{
			if (_extraDrawCount == -1)
			{
				_extraDrawCount = PlayerPrefs.GetInt("ExtraDrawCount", _extraDrawCount);
			}
			return _extraDrawCount;
		}
		set
		{
			_extraDrawCount = value;
			PlayerPrefs.SetInt("ExtraDrawCount", _extraDrawCount);
			PlayerPrefs.Save();
		}
	}

	public static GameStatistics gameStatisticsData
	{
		get
		{
			return _GameStatisticsData;
		}
		set
		{
			if (_GameStatisticsData == null)
			{
				_GameStatisticsData = value;
			}
		}
	}

	public static AchieveRecords achieveRecords
	{
		get
		{
			return _AchieveRecords;
		}
		set
		{
			_AchieveRecords = value;
			//StreamTools.SerializeObject(_AchieveRecords, achieveDataRecordPath);
			string json = _AchieveRecords.ToJson();
			PlayerPrefs.SetString("AchieveRecords", json);
			PlayerPrefs.Save();
		}
	}

	public static MissionRecords missionRecords
	{
		get
		{
			return _MissionRecords;
		}
		set
		{
			_MissionRecords = value;
			//StreamTools.SerializeObject(_MissionRecords, missionLevelDataRecordPath);
			/* string json = _MissionRecords.ToJson();
			PlayerPrefs.SetString("MissionRecords", json);
			PlayerPrefs.Save(); */
		}
	}

	public static QuickFirePlayer.PlayerData quickFireRecords
	{
		get
		{
			return _QuickFireRecords;
		}
		set
		{
			_QuickFireRecords = value;
			//StreamTools.SerializeObject(_QuickFireRecords, quickFireGameRecordPath);
			string json = JsonUtility.ToJson(_QuickFireRecords);
			PlayerPrefs.SetString("QuickFirePlayer.PlayerData", json);
			PlayerPrefs.Save();
		}
	}

	public static float MaxImpulse
	{
		get
		{
			return _maxImpulse;
		}
		set
		{
			_maxImpulse = value;
		}
	}

	public static PoolDataAsset GetPoolDatas()
	{
		return PoolDatas;
	}

	public static void SetPoolDatas(PoolDataAsset data)
	{
		PoolDatas = data;
	}
}
